package cn.itcast.web.servletcontext;

import java.text.DecimalFormat;

public class Demo {
    public static void main(String[] args) {

        double i = 0.1;
        ceShi(i);

    }

    public static void ceShi(double i){

        double c = 0;
        for (int j = 0; j < (365 * 40); j++) {

            c += i;
            i = c;
            if (j == (364 )){
                String format = new DecimalFormat("#.00").format(c);
                System.out.println(format);
            }

        }

    }

}
